package com.game.message.model;

import java.util.List;

import com.eova.common.base.BaseModel;

public class GameUserMessage extends BaseModel<GameUserMessage> {
	/**
	 * TODO（用一句话描述这个变量表示什么）
	 */

	private static final long serialVersionUID = 1L;

	public static final GameUserMessage dao = new GameUserMessage();

	/**
	 * 
	 * 描述:获取用户的信息 作者:gyp
	 */
	public List<GameUserMessage> getInfos(String userId) {
		String sql = "SELECT gum.id AS id,gum.roomId AS roomId,gum.createTime AS createTime,gum.winmoney as winmoney,ri.roomName as roomName,"
				+ " gu.headImgUrl AS headImgUrl,gu.nickName AS nickName,gu.id AS userId "
				+ " FROM game_user_message gum "
				+ " LEFT JOIN game_user gu ON gum.userId = gu.id "
				+ " LEFT JOIN room_info ri ON gum.roomId = ri.id "
				+ " where gum.userId=? " + " ORDER BY gum.createTime DESC";
		return this.find(sql, userId);
	}

}